package com.wolf.gulimall.product.dao;

import com.wolf.gulimall.product.entity.AttrGroupEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wolf.gulimall.product.vo.SkuItemVo;
import com.wolf.gulimall.product.vo.SpuItemAttrGroupVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 属性分组
 *
 * @author wolfmoon
 * @email wolfmoon@gmail.com
 * @date 2022-11-15 16:09:03
 */
@Mapper
public interface AttrGroupDao extends BaseMapper<AttrGroupEntity> {

    /**
     *  根据spuId 和三级分类ID查询当期spu对应分组,属性信息
     * @param spuId  spuId
     * @param catalogId 三级分类ID
     * @return 当期spu对应分组,属性信息
     */
    List<SpuItemAttrGroupVo> getAttrGroupWithAttrsBySpuId(@Param("spuId") Long spuId, @Param("catalogId") Long catalogId);
}
